using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class FMS_PromptOrderMap : EntityTypeConfiguration<FMS_PromptOrder>
	{
		public FMS_PromptOrderMap()
		{
			// Primary Key
			this.HasKey(t => t.Id);

			// Properties
			this.Property(t => t.ToDeptName)
				.HasMaxLength(100);
				
			this.Property(t => t.Content)
				.HasMaxLength(500);
				
			this.Property(t => t.CreateUserName)
				.HasMaxLength(50);
				
			this.Property(t => t.CreateDeptName)
				.HasMaxLength(100);
				
			// Table & Column Mappings
			this.ToTable("FMS_PromptOrder");
			this.Property(t => t.Id).HasColumnName("Id");
			this.Property(t => t.ToUserId).HasColumnName("ToUserId");
			this.Property(t => t.ToDeptId).HasColumnName("ToDeptId");
			this.Property(t => t.ToDeptName).HasColumnName("ToDeptName");
			this.Property(t => t.SubjectId).HasColumnName("SubjectId");
			this.Property(t => t.Content).HasColumnName("Content");
			this.Property(t => t.CreateUser).HasColumnName("CreateUser");
			this.Property(t => t.CreateUserName).HasColumnName("CreateUserName");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.CreateDeptName).HasColumnName("CreateDeptName");
			this.Property(t => t.CreateDeptId).HasColumnName("CreateDeptId");
			this.Property(t => t.Status).HasColumnName("Status");
			this.Property(t => t.ReadTime).HasColumnName("ReadTime");
			this.Property(t => t.PlanPayTime).HasColumnName("PlanPayTime");
			this.Property(t => t.AskPayTime).HasColumnName("AskPayTime");
		}
	}
}

